// ============================================================================
//     _____ __  _      __            _       __      ____
//    / ___// /_(_)____/ /_____  ____| |     / /___ _/ / /
//    \__ \/ __/ / ___/ //_/ _ \/ ___/ | /| / / __ `/ / /
//   ___/ / /_/ / /__/ ,< /  __/ /   | |/ |/ / /_/ / / /
//  /____/\__/_/\___/_/|_|\___/_/    |__/|__/\__,_/_/_/
//
// Copyright (C) by daxnet
// https://gitee.com/daxnet/stickerwall
// MIT License
// ============================================================================

using Stickerwall.Common.Models;

namespace Stickerwall.Common;

public interface IDataAccessor
{
    #region Public Methods

    Task<int> CreateStickerAsync(string tenantId, Sticker sticker, CancellationToken cancellationToken = default);

    Task DeleteStickerByIdAsync(string tenantId, int id, CancellationToken cancellationToken = default);

    Task<Sticker?> GetStickerByIdAsync(string tenantId, int id, CancellationToken cancellationToken = default);

    Task<PagedEntity<Sticker>> GetStickersAsync(string tenantId,
        string filterExpression = "",
        string sortExpression = "DateCreated", SortOrder sortOrder = SortOrder.Descending, int pageSize = 25,
        int pageNumber = 1, CancellationToken cancellationToken = default);

    Task UpdateStickerAsync(string tenantId, int id, Sticker sticker, CancellationToken cancellationToken = default);

    Task<(bool, string?)> CheckDatabaseTableAsync(CancellationToken cancellationToken = default);

    #endregion Public Methods
}